//
//  AddPartListSubView.h
//  HondaPro_2
//
//  Created by Eric on 13-6-28.
//  Copyright (c) 2013年 glendale. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "MainMenuDataModel.h"
#import "mm_addPartListToIndicationUserDefinedCell.h"
#import "popContentViewController.h"
#import "DDPopoverBackgroundView.h"

#import "SVProgressHUD.h"

@interface AddPartListSubView : UIView <UITableViewDataSource,UITableViewDelegate,UITextFieldDelegate,UIAlertViewDelegate>
{
    UITextField *lingjianhaoAfterTxt;
    UITextField *groupNameTxt;
    UITextField *groupCodeTxt;
    UITextField *countTxt;
    UITextField *amountTxt;
    UITextField *lingjianNameField;
    
    UITableView *tableViewDis;
    
    //当前选中的零件行数
    NSInteger _nCurrentRowSel;
    
    //用来存储零件列表
    NSMutableArray *_arrPartList;
    NSMutableArray *_arrPartListToDisplay;
    
    //有库存字符串
    NSString *_isInStock;
    
    NSInteger _from;
    NSInteger _to;
    NSMutableArray *arrTmpToUpdate;
    
    UIAlertView *_partListRepeated;
    
    //下拉菜单属性
    popContentViewController *contentCon;
    UIPopoverController *popCon;
}

//设置按钮的状态
-(void)setUpTheStateBtnByBtn:(UIButton *)btn andState:(BOOL)state;

//判断要添加的零件是不是已经存在
-(BOOL)thePartNotRepeat;

//判断作业指示的 服务类型 是否是保修
-(BOOL)isWarrantyByServiceInIndication;

//得到列表中的最大序号
-(NSInteger)getTheMaxNumber;

@property (strong,nonatomic) NSArray *arrOriginalDataForServiceType;
@property (strong,nonatomic) NSArray *arrOriginalDataForRepairType;
@property(nonatomic,assign)double discount;
//根据ID取名字
-(NSString *)getNameByServiceId:(NSString *)serviceId;
-(NSString *)getNameByRepairId:(NSString *)RepairId;

@end
